<?php
class PromotionController extends Zend_Controller_Action{
	
	public function indexAction(){
		$this->view->layout()->disableLayout();
		$filePath =  PUBLIC_PATH.DIRECTORY_SEPARATOR."khuyenmai".DIRECTORY_SEPARATOR."index.html";
		if(file_exists($filePath)){
			$fileContent =  file_get_contents($filePath);
			$pattern = '/src="images/';
			if(preg_match($pattern, $fileContent)){
				$content = preg_replace($pattern, 'src="'.PUBLIC_URL.'/khuyenmai/images', $fileContent);
				echo $content;
			}
		}
	}
}